//import {Adapter_Impl}  from "./adapter_canvas2D"
import { BitMath } from "../math/math";
//import { Adapter_Impl_Webgl } from "./adapter_webgl";
export { Shaders } from "./shaders";
export { ShaderResources } from "./shaderress";
export { Renderer } from "./render_webgl";
export { Render_Texture } from "./render_texture";
export module Adapter {
  //export var CreateWebglAdapter = Adapter_Impl_Webgl.CreateWebglAdapter;
  //export type RenderAdapter_Webgl = Adapter_Impl_Webgl.RenderAdapter_Webgl;
  //export let CreateWebCanvasAdapter = render.Adapter.CreateWebCanvasAdapter;
  export interface ITexture_Writeable extends ITexture {
    width: number;
    height: number;
    BeginWrite(x: number, y: number, w: number, h: number): void;
    Write8bitBlock(x: number, y: number, data: Uint8Array, size: number): void;
    EndWrite(): void;
  }
  export interface ITexture {
    Close(): void;
  }
  export interface IRenderAdapter {
    CreateWriteableTexture(palette: BitMath.Palette, width: number, height: number): ITexture_Writeable;
    Draw(tex: Adapter.ITexture, srcrect: BitMath.Rect, x: number, y: number, color?: BitMath.Color): void;
    DrawScale(tex: Adapter.ITexture, srcrect: BitMath.Rect, dest: BitMath.Rect, color?: BitMath.Color): void;
  }
}

